// component/ui/z-picker/z-picker.js
Component({

  /**
   * 组件的配置
   */
  options: {
    styleIsolation: 'isolated',
    pureDataPattern: /^_/,
  },

  /**
   * 组件的属性列表
   */
  properties: {
    leftBtn: {
      type: String,
      value: 'back',
    },
    value: {
      type: Object,
      value: {},
    },
    options: {
      type: Array,
      value: [],
    },
    title: {
      type: String,
      value: '',
    }
  },

  /**
   * 组件的初始数据
   */
  data: {},

  /**
   * 组件的数据监听
   */
  observers: {},

  /**
   * 组件的生命周期
   */
  lifetimes: {
    created() {},
    attached: function () {},
    detached: function () {},
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onConfirm(e) {
      this.triggerEvent('change', e.detail)
    },

    onClose() {
      this.triggerEvent('close')
    },

  }
})